import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("company", { schema: "alumni" })
export class Company {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", { name: "user_id", unsigned: true, default: () => "'0'" })
  userId: number;

  @Column("varchar", { name: "name", length: 20 })
  name: string;

  @Column("varchar", { name: "address", length: 100 })
  address: string;

  @Column("text", { name: "content", nullable: true })
  content: string | null;

  @Column("int", {
    name: "create_time",
    comment: "发起时间",
    unsigned: true,
    default: () => "'0'",
  })
  createTime: number;
}
